#include <stdio.h>

int main()
{
    int num1,num2;
    float a,b;

    scanf("%d",&num1);
    scanf("%d",&num2);

    a =4/3.0*3.1415926*num1*num1*num1/8000*7.86;
    b =4/3.0*3.1415926*num2*num2*num2/8000*19.3;
    printf("%.3f %.3f",a,b);

    return 0;
}